Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add preliminary Swift Syntax HighLighting #10

Closed
wants to merge 1 commit into from
Closed

Add preliminary Swift Syntax HighLighting #10

wants to merge 1 commit into from

Conversation

naclcaleb
Copy link

This was created due to #8

@naclcaleb
Copy link
Author

I realize I forgot to add any tmPreferences files for this, as well as Default.sublime-keymap or a sublime-build file, since none of those were included in the repo the files were retrieved from: https://github.com/GregoryBL/SwiftSyntax

@cmyr
Copy link
Member

cmyr commented May 14, 2019

So not having sublime-keymap is fine, since we don't really expect to use it. The missing tmPreferences is more of a concern, since we depend on them for auto-indent and comment toggling, which are pretty important for language support.

It's also not great that the syntax is three years old, although I'm not sure exactly what will be missing; does do-try-catch get highlighted correctly with this syntax, for instance? How about visibility modifiers?

I'd be curious for @mmatoszko's opinion, here: he looked into this a little while ago iirc.

@naclcaleb
Copy link
Author

I'll keep working on it. I might need to find a newer sublime-syntax.

@naclcaleb
Copy link
Author

I found this, which uses tmLanguage.
Does this need to be converted to a sublime-syntax file?

https://github.com/quiqueg/Swift-Sublime-Package

@cmyr
Copy link
Member

cmyr commented May 14, 2019

We can load either tmLanguage or sublime-syntax. I'm not sure if there's a preference? The place to check would be the docs for syntect which is the library that handles this stuff.

@MatthiasPortzel
Copy link
Contributor

MatthiasPortzel commented May 14, 2019

I wasn’t successful in my early testing when using .tmLanguage files; I’ve been converting them with the sublime_syntax_convertor gem.
I also have Swift syntax working locally; I was planning on PRing soon. I used https://github.com/quiqueg/Swift-Sublime-Package

@naclcaleb
Copy link
Author

Ok, I'll leave that to you then

@naclcaleb naclcaleb closed this May 14, 2019
@cmyr
Copy link
Member

cmyr commented May 14, 2019

Okay cool, thanks for the info @matthiassaihttam and thanks for the PR @naclcaleb!

@naclcaleb
Copy link
Author

Welcome!
Sorry I wasn't very much help. I don't actually use xi-editor. I tried installing it a couple times, but I get an error about it not supporting Swift 5.

And in general I use Vim and VSCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants